<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>DBcc Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">DBcc Instruction<BR>
</h1>
<hr noshade></h1>
<span class="text"><BR>
DBcc is an instruction that quits loops. The instruction is very similar to Bcc (same conditions are used, see above for the different conditions) except that the first operand is a data register that will be decreased with one until is reached -1, then the loop stops. The loop can also quit if the flags are set correctly (specified with the condition). You often use DBRA, which will quit the loop when the data register has reached -1. If you want the loop the be looped 10 times, you should set a data register to 9 (since it ends at -1, not 0).<BR>
        <BR>
ADDRESS METHODS: No real address method.<BR>
        <BR>
DATA LENGTH: Word<BR>
<BR>
FLAGS: Unaffected<BR>
<BR>
SYNTAX: DBcc Dn,&lt;label&gt;<BR>

  </span>
<P align=left><span class="text"><strong style="font-weight: 400">EXAMPLE CODE:</strong></span></P>
<P align=left class="sourcecode"><strong style="font-weight: 400">
<font face="Arial" size="2">&nbsp;&nbsp; DBRA&nbsp;&nbsp;&nbsp; D0,branch&nbsp;&nbsp;&nbsp;  
subtracts 1 from D0, will skip line if D0 = -1</font></strong></P>
<p>&nbsp;</p>
</body>
</html>